package com.caocaog.market.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.caocaog.market.entity.PushTaskRecord;
import com.caocaog.market.service.PushTaskRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.GenericController;
import org.jeecg.common.system.domain.QueryRequest;
import org.jeecg.common.system.query.PageGenerator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 推送任务记录
 *
 * @author chechen
 * @date 2022-05-25
 */
@RestController
@Api(value = "pushTaskRecord", tags = PushTaskRecordController.TABLE_MEANING)
@RequestMapping("/api/pushTaskRecord")
public class PushTaskRecordController extends GenericController<PushTaskRecord, PushTaskRecordService> {

    public static final String TABLE_MEANING = "推送任务记录";

    @GetMapping
    @ApiOperation(value = TABLE_MEANING + PAGE)
    public Result<IPage<PushTaskRecord>> page(PushTaskRecord pushTaskRecord, QueryRequest queryRequest) {
        Page<PushTaskRecord> page = PageGenerator.createPageSort(queryRequest);
        return Result.OK(super.service.queryPushTaskRecordPage(page, pushTaskRecord));
    }

}
